Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdl): move validation from cloudmos to sdl (#133) #82

Merged
merged 9 commits into from
May 10, 2024
Merged

Conversation

ygrishajev
Copy link
Contributor

@ygrishajev ygrishajev commented Apr 23, 2024

Changes:

  • Validation Movement: Shifts validation responsibilities from Cloudmos to Akashjs.
  • Improved Initialization Flow: Ensures validation occurs during class initialization, enhancing reliability.
  • Deprecation Notices: Adds warnings to deprecated static methods that were previously used before being incorporated into the constructor, streamlining the integration process.

Note:

  • This is just a part of all the validation. More is to come.

src/sdl/SDLFactory.ts Outdated Show resolved Hide resolved
src/sdl/SDLFactory.ts Outdated Show resolved Hide resolved
src/sdl/YamlSDLParser.ts Outdated Show resolved Hide resolved
src/sdl/YamlSDLParser.ts Outdated Show resolved Hide resolved
src/sdl/YamlSDLParser.ts Outdated Show resolved Hide resolved
src/sdl/index.ts Outdated Show resolved Hide resolved
src/sdl/index.ts Outdated Show resolved Hide resolved
src/sdl/index.ts Outdated Show resolved Hide resolved
src/sdl/YamlSDLParser.ts Outdated Show resolved Hide resolved
src/sdl/types.ts Outdated Show resolved Hide resolved
@ygrishajev ygrishajev requested review from baktun14 and Redm4x April 23, 2024 14:54
@ygrishajev ygrishajev force-pushed the feature/sdl branch 2 times, most recently from b345e4d to 245f7a9 Compare May 3, 2024 10:54
@codecov-commenter
Copy link

codecov-commenter commented May 3, 2024

Codecov Report

Attention: Patch coverage is 82.92220% with 90 lines in your changes are missing coverage. Please review.

Project coverage is 70.85%. Comparing base (b95352f) to head (e794887).
Report is 3 commits behind head on main.

Files Patch % Lines
src/sdl/SDL/SDL.ts 82.90% 80 Missing and 6 partials ⚠️
src/error/ValidationError.ts 57.14% 2 Missing and 1 partial ⚠️
src/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #82       +/-   ##
===========================================
+ Coverage   54.01%   70.85%   +16.83%     
===========================================
  Files          15       21        +6     
  Lines         648      741       +93     
  Branches      171      201       +30     
===========================================
+ Hits          350      525      +175     
+ Misses        298      208       -90     
- Partials        0        8        +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ygrishajev ygrishajev changed the title refactor(sdl): separates yaml parser and factory from SDL (#77) feat(sdl): move denom validation from cloudmos to sdl (#133) May 3, 2024
@ygrishajev ygrishajev marked this pull request as ready for review May 3, 2024 10:55
@ygrishajev ygrishajev changed the title feat(sdl): move denom validation from cloudmos to sdl (#133) feat(sdl): move validation from cloudmos to sdl (#133) May 3, 2024
ygrishajev added 2 commits May 8, 2024 16:36
As part of this:
- run validation on the class init
- add deprecation warning to static validation method
- move along necessary deps types and deps from cloudmos
@ygrishajev ygrishajev force-pushed the feature/sdl branch 3 times, most recently from 6ce2a4b to 5486eab Compare May 8, 2024 14:54
src/sdl/index.ts Outdated
const { credentials } = this.data.services[serviceName];

if (credentials) {
const credentialsKeys: (keyof v2ServiceImageCredentials)[] = ["host", "username", "password"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is there in type, however its not validated in node akash-network/node@6e68af0#diff-346f62ceedbdbca807c73a4314af6b8da932fdb8ee2e91c92dbecd5c2745f24aR190

so i skipped any validation here too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so is this fine @baktun14 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok I guess yea, this is intended? @troian

src/sdl/SDL/SDL.spec.ts Outdated Show resolved Hide resolved
@ygrishajev ygrishajev requested review from Redm4x and baktun14 May 8, 2024 18:40
@ygrishajev ygrishajev force-pushed the feature/sdl branch 3 times, most recently from 04f0158 to e1b055a Compare May 9, 2024 08:11
@ygrishajev ygrishajev merged commit aece776 into main May 10, 2024
3 checks passed
@ygrishajev ygrishajev deleted the feature/sdl branch May 10, 2024 07:31
Copy link

🎉 This PR is included in version 0.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants